﻿@model Webcar.Entitys.SEC_END

@{ Layout = "~/Views/Shared/_leftPanelLayout.cshtml";}
@section LeftTree
{
     
    @{
        Html.RenderPartial("DeptTreePartialView", new Webcar.Models.DeptTreeMode{ Action = "List", Controller = "Sec" ,ShowChild=false });
     }
}

    
@using (Html.BeginForm("End", "Sec", Html.ViewContext.RouteData.Values,FormMethod.Post))
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(a => a.SEC_NO)
    <table>
        <tr>
            <td>

           
        <div style="float:left;">
            <table class="edit-table" style="width:500px">
                <tr>
                    <td style="width: 100px; text-align: right;">*结案时间：</td>
                    <td>@Html.CalendarFor(a => a.END_DATE)</td>
                    <td style="width: 80px; text-align: right">赔偿系数：</td>
                    <td>@Html.TextBoxFor(a => a.PAY_XS)</td>
                </tr>

                <tr>
                    <td style="width: 80px; text-align: right">*保险单号：</td>
                    <td colspan="3">@Html.DropDownListFor(a => a.INSURE_NO,(SelectList)ViewBag.InsureNoList)</td>
                
                </tr>
            
                <tr>
                    <td style="width: 80px; text-align: right">我方伤者：</td>
                    <td colspan="3">@Html.TextAreaFor(a => a.OWN_INJURY,3,20,new { @style = "width: 100%;" })</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right">第三方伤者：</td>
                    <td colspan="3">@Html.TextAreaFor(a => a.THIRD_INJURY,3,20,new { @style = "width: 100%;" })</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right">我方情况登记：</td>
                    <td colspan="3">@Html.TextAreaFor(a => a.OWN_STATUS,3,20,new { @style = "width: 100%;" })</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right">第三方情况登记：</td>
                    <td colspan="3">@Html.TextAreaFor(a => a.INJURY_STATUS,3,20,new { @style = "width: 100%;" })</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right">请付单位：</td>
                    <td colspan="3">@Html.TextBoxFor(a => a.PAY_DEPT)</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right">赔偿事宜：</td>
                    <td colspan="3">@Html.TextAreaFor(a => a.PAY_CASE,2,20,new { @style = "width: 100%;" })</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right">开户行：</td>
                    <td colspan="3">@Html.TextBoxFor(a => a.PAY_BANK)</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right;">帐号：</td>
                    <td colspan="3">@Html.TextBoxFor(a => a.ACCOUNT)</td>
                </tr>
                <tr>
                    <td style="width: 80px; text-align: right;">实际赔付金额：</td>
                    <td colspan="3">@Html.TextBoxFor(a => a.FACT_MONEY)</td>
                </tr>

            </table>
        </div>
        <div style="float:left;text-align:left; width:220px;margin-left:10px">
            <table class="edit-table" style="width:100%">
                <tr><td colspan="2">我方赔偿明细</td></tr>
            @{
                foreach (var item in ViewBag.OwnPayList)
                {
                    string v = @item.Item1;
                    float v2 = @item.Item2;
                    
                    <tr>
                        <td style="width:120px">@Html.TextBox("ownpay",v)</td>
                        <td>@Html.TextBox("ownpaymoney",v2)</td>
                    </tr>
                }
            }  
            </table>
        </div>
        <div style="float:left;text-align:left; width:220px; margin-left:10px">
            <table class="edit-table" style="width:100%">
                <tr><td colspan="2">第三方赔偿明细</td></tr>
            @{
                foreach (var item in ViewBag.ThirdPayList)
                {
                    string v = @item.Item1;
                    float v2 = @item.Item2;
                    
                    <tr>
                        <td style="width:120px">@Html.TextBox("thirdpay",v)</td>
                        <td>@Html.TextBox("thirdpaymoney",v2)</td>
                    </tr>
                }
            }  
            </table>
            <div style="margin-top:5px">双方合计：@ViewBag.SumMoney</div>
        </div>
         </td>

        </tr>
    </table>
    
    <div id="footer">
        <div class="validation-errors">@ViewBag.ErrorMessage</div>
        <table >
            <tr>
                <td ></td>
                <td>
                    @Html.DevExpress().Button(settings =>
                    {
                        settings.Name = "Button1";
                        settings.Text = CurrentUser.CheckPermission(PermissionManager.编辑安全事故) ? "保存" : "无权限";
                        settings.Enabled = CurrentUser.CheckPermission(PermissionManager.编辑安全事故);
                        settings.UseSubmitBehavior = true;
                        settings.Width = 70;
                        settings.ControlStyle.CssClass = "button1";
                    }).GetHtml()
                

                </td>
                <td>
                    @Html.DevExpress().Button(settings =>
                    {
                        settings.ControlStyle.CssClass = "button2";
                        settings.Name = "Button2";
                        settings.Text = "取消";
                        settings.Width = 70;
                        settings.ClientSideEvents.Click = "function(s, e){history.back(); }";
                    }).GetHtml()
                </td>
            </tr>

        </table>
    </div>
}
